<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
          <!--  <div class="panel-heading">
                <button id="btn-edit" th:onclick="'javascript:loadEditData(\'' + @{/activityOuts/edit(editType='ADD')} + '\')'" class="btn btn-sm btn-success">发布赛况</button>
            </div>-->
            <div class="panel-body">
                <!-- Search -->
                <form th:id="form-data" th:action="@{/activityOuts/findQuery}" th:object="${activityOuts}" method="post">
                    <div class="form-group form-group-bot">
                        <label class="col-sm-1 control-label search-label">标题</label>
                        <div class="col-sm-3 col-search">
                            <input type="text" class="form-control" th:field="*{outsTitle}" th:autocomplete="off" placeholder="请输入赛况标题" />
                        </div>
                        <label class="col-sm-1 control-label search-label">活动</label>
                        <div class="col-sm-3 col-search">
                            <input type="text" class="form-control" th:field="*{activityName}" th:autocomplete="off" placeholder="请输入活动名称" />
                        </div>
                        <div class="col-sm-1 col-search-btn">
                            <button class="btn btn-sm btn-primary" type="button" onclick="loadSearchData()">查询</button>
                        </div>
                    </div>
                </form>
                <!-- Show Data -->
                <table class="table table-striped table-hover table-bordered">
                    <tr class="text-center">
                        <th class="col-sm-1">#</th>
                        <th>标题</th>
                        <th>活动名称</th>
                        <th>发布人</th>
                        <th>赛况图片</th>
                        <th>是否展示</th>
                        <th>是否置顶</th>
                        <th class="col-sm-1">活动时间</th>
                        <th class="col-sm-1">发布时间</th>
                        <th class="col-sm-2">操作</th>
                    </tr>
                    <tbody>
                        <tr th:each="obj,stat : ${data}">
                            <td th:text="${stat.count}"></td>
                            <td th:text="${obj.outsTitle}"></td>
                            <td th:text="${obj.activityName}"></td>
                            <td th:text="${obj.outsAuthor}"></td>
                            <td><img class="user-headImg" th:src="#{system.base.url} + ${obj.outsImg}" src=""/></td>
                            <td th:text="${obj.outsStatus  == true ? '是' : '否'}"></td>
                            <td th:text="${obj.isTop == true ? '是' : '否'}"></td>
                            <td th:text="${#dates.format(obj.createTime, 'yyyy-MM-dd')}"></td>
                            <td th:text="${#dates.format(obj.inputTime, 'yyyy-MM-dd')}"></td>
                            <td><button class="btn btn-sm btn-primary btn-lit left" type="button"
                                        th:onclick="'javascript:loadEditData(\'' + @{/activityOuts/edit(id=${obj.id},editType='EDIT')} + '\')'">编辑
                                </button>
                                <button class="btn btn-sm btn-danger btn-lit left" type="button" style="margin-left: 1px;"
                                        th:onclick="'javascript:loadDeleteData(\'' + @{/activityOuts/delete(id=${obj.id})} + '\')'">删除
                                </button></td>
                        </tr>
                    </tbody>
                </table>
                <div class="bottom-no-data" th:if="${data.totalPages eq 0}">对不起~没有数据~</div>
                <!-- Pagination -->
                <div th:include="~{common/pagination :: pagin}"></div>
            </div>
        </div>
    </div>
</div>

